import requests
from requests.auth import HTTPBasicAuth
def req():
    url = "https://httpbin.ceshiren.com/basic-auth/ad/123"
    r = requests.get(url = url, auth = HTTPBasicAuth("ad","123"))
    print(r.json())
    assert r.json()["user"]=='ad'
req()
